package van.planifolia.adapter;

/**
 * Created by Intellij IDEA<br>
 *
 * @author Planifolia.Van
 * @version 1.0
 * @date 2022/11/8 18:48
 */
public class Test {
    public static void main(String[] args) {
        // 类适配只要new出来类适配器对象调用对于方法即可
        RandomInt randomInt = new ClassAdapter();
        System.out.println(randomInt.outPutRandom());
        // 对象适配器要通过构造方法传入被适配类的对象实例
        RandomInt randomInt1 = new ObjectAdapter(new RandomString());
        System.out.println(randomInt1.outPutRandom());
    }
}
